import { VideoADData } from "../../../sdata/res/VideoAD";
import jscsv from "../../GMDBase/jscsv";

//按照分享口id索引的行
let g_IndexChannelId:any = {}

class SDataVideoAD extends jscsv
{
    constructor()
    {
        super(VideoADData)

        this.Foreach(
            (key,row)=>{
                var cid = row[this.FD.I_AdChannel]
                g_IndexChannelId[cid] = row
            }
        )
    }

    //获取一个分享口的信息
    public GetChannel(channelID:number)
    {
        return g_IndexChannelId[channelID]
    }

    //返回分享口列表
    public get ChannelList():number[]{
        var re = []
        for(var cid in g_IndexChannelId) re.push(cid)
        return re
    }
}

var inst = new SDataVideoAD()
export{ inst as SDataVideoAD }